import React, { Component } from 'react'

export default class Child extends Component {
  state={
    // users:[
    //   {id: "001", name:"adrian", age: 40},
    //   {id: "002", name:"Tom", age: 55},
    //   {id: "004", name:"jerry", age: 50}
    // ]

    users:'abc'
  }
  render() {
    return (
      <div>
        <h3>我是子组件</h3>
        {
          this.state.users.map((userObj)=>{
            return (
              <h4 key={userObj.id}>我叫：{userObj.name}， 我今年{userObj.age}</h4>
            )
          })
        }
      </div>
    )
  }
}
